From e0eb397aca0cf355d48f9ba70dbdcfca4664401e Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 22 Aug 2006 17:35:26 +0000 Subject: [PATCH] AN1 Reader: Trust URL encoded in new format over old encoding. --- an1.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/an1.c b/an1.c index e86ed61b4..cc15fe0fc 100644 --- a/an1.c +++ b/an1.c @@ -415,6 +415,12 @@ static void Read_AN1_Waypoint( FILE *f, an1_waypoint_record *wpt ) { ofs += 2; if ( len ) { + /* + * Trust URL encoded in new format over one in + * old format. Whack the name starting at '{URL='. + */ + wpt->name[strlen(wpt->name) - len - 6] = 0; + wpt->url = xcalloc( len+1, 1 ); memcpy( wpt->url, ofs, len ); ofs += len; -- 2.30.2